// 
// Decompiled by Procyon v0.5.36
// 

package com.orange.boot.environment.entity;

import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@TableName("t_environment_data")
@ApiModel(
        value = "Insecticide对象",
        description = "接收环境数据"
)
@Data
@AllArgsConstructor
public class EnvironmentData {
    private static final long serialVersionUID = 1L;
    @TableId(
            value = "id",
            type = IdType.AUTO
    )
    private Long id;
    @TableField("data_id")
    private Integer dataId;
    @TableField("code")
    private String code;
    @TableField("name")
    private String name;
    @TableField("value")
    private Double value;
    @TableField("value_text")
    private String valueText;
    @TableField("unit")
    private String unit;
    @TableField("icon")
    private String icon;
    @TableField("level")
    private Integer level;
    @TableField("source_machine")
    private Long sourceMachine;
    @TableField(
            value = "gmt_create",
            fill = FieldFill.INSERT
    )
    private LocalDateTime gmtCreate;
    @TableField(
            value = "is_deleted",
            fill = FieldFill.INSERT
    )
    @JsonIgnore
    private boolean isDelete;
    @TableField("version")
    @Version
    private Integer version;

    public EnvironmentData(Integer id, String code, String name, Double value, String valueText, String unit, String icon, Integer level, Long sourceMachine) {
        this.dataId = id;
        this.code = code;
        this.name = name;
        this.value = value;
        this.valueText = valueText;
        this.unit = unit;
        this.icon = icon;
        this.level = level;
        this.sourceMachine = sourceMachine;
    }

    public EnvironmentData() {
    }

    public EnvironmentData(String code, Double value, String unit, LocalDateTime gmtCreate) {
        this.code = code;
        this.value = value;
        this.unit = unit;
        this.gmtCreate = gmtCreate;
    }
}
